/* generated using openapi-typescript-codegen -- do no edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { BaseResponse } from '../models/BaseResponse';
import type { BaseResponse_CarbonEmissionVO_ } from '../models/BaseResponse_CarbonEmissionVO_';
import type { BaseResponse_Page_CarbonEmission_ } from '../models/BaseResponse_Page_CarbonEmission_';
import type { BaseResponse_Page_CarbonEmissionVO_ } from '../models/BaseResponse_Page_CarbonEmissionVO_';
import type { BaseResponse_string_ } from '../models/BaseResponse_string_';
import type { CarbonEmissionQueryRequest } from '../models/CarbonEmissionQueryRequest';
import type { CarbonEmissionUpdateRequest } from '../models/CarbonEmissionUpdateRequest';
import type { CancelablePromise } from '../core/CancelablePromise';
import { OpenAPI } from '../core/OpenAPI';
import { request as __request } from '../core/request';
export class CarbonEmissionControllerService {
    /**
     * seach
     * @param companyName companyName
     * @param year year
     * @returns BaseResponse_CarbonEmissionVO_ OK
     * @throws ApiError
     */
    public static seachUsingGet(
        companyName: string,
        year: string,
    ): CancelablePromise<BaseResponse_CarbonEmissionVO_> {
        return __request(OpenAPI, {
            method: 'GET',
            url: '/carbonEmission',
            query: {
                'companyName': companyName,
                'year': year,
            },
            errors: {
                401: `Unauthorized`,
                403: `Forbidden`,
                404: `Not Found`,
            },
        });
    }
    /**
     * add
     * @param companyName companyName
     * @param companyStyle companyStyle
     * @param file file
     * @param year year
     * @returns BaseResponse_string_ OK
     * @returns any Created
     * @throws ApiError
     */
    public static addUsingPost(
        companyName?: string,
        companyStyle?: string,
        file?: Blob,
        year?: string,
    ): CancelablePromise<BaseResponse_string_ | any> {
        return __request(OpenAPI, {
            method: 'POST',
            url: '/carbonEmission',
            query: {
                'companyName': companyName,
                'companyStyle': companyStyle,
                'year': year,
            },
            formData: {
                'file': file,
            },
            errors: {
                401: `Unauthorized`,
                403: `Forbidden`,
                404: `Not Found`,
            },
        });
    }
    /**
     * getCarbonEmissionVOById
     * @param id id
     * @returns BaseResponse_CarbonEmissionVO_ OK
     * @throws ApiError
     */
    public static getCarbonEmissionVoByIdUsingGet(
        id?: number,
    ): CancelablePromise<BaseResponse_CarbonEmissionVO_> {
        return __request(OpenAPI, {
            method: 'GET',
            url: '/carbonEmission/get/vo',
            query: {
                'id': id,
            },
            errors: {
                401: `Unauthorized`,
                403: `Forbidden`,
                404: `Not Found`,
            },
        });
    }
    /**
     * listCarbonEmissionByPage
     * @param carbonEmissionQueryRequest carbonEmissionQueryRequest
     * @returns BaseResponse_Page_CarbonEmission_ OK
     * @returns any Created
     * @throws ApiError
     */
    public static listCarbonEmissionByPageUsingPost(
        carbonEmissionQueryRequest: CarbonEmissionQueryRequest,
    ): CancelablePromise<BaseResponse_Page_CarbonEmission_ | any> {
        return __request(OpenAPI, {
            method: 'POST',
            url: '/carbonEmission/list/page',
            body: carbonEmissionQueryRequest,
            errors: {
                401: `Unauthorized`,
                403: `Forbidden`,
                404: `Not Found`,
            },
        });
    }
    /**
     * listCarbonEmissionVOByPage
     * @param carbonEmissionQueryRequest carbonEmissionQueryRequest
     * @returns BaseResponse_Page_CarbonEmissionVO_ OK
     * @returns any Created
     * @throws ApiError
     */
    public static listCarbonEmissionVoByPageUsingPost(
        carbonEmissionQueryRequest: CarbonEmissionQueryRequest,
    ): CancelablePromise<BaseResponse_Page_CarbonEmissionVO_ | any> {
        return __request(OpenAPI, {
            method: 'POST',
            url: '/carbonEmission/list/page/vo',
            body: carbonEmissionQueryRequest,
            errors: {
                401: `Unauthorized`,
                403: `Forbidden`,
                404: `Not Found`,
            },
        });
    }
    /**
     * listMyCarbonEmissionVOByPage
     * @param carbonEmissionQueryRequest carbonEmissionQueryRequest
     * @returns BaseResponse_Page_CarbonEmissionVO_ OK
     * @returns any Created
     * @throws ApiError
     */
    public static listMyCarbonEmissionVoByPageUsingPost(
        carbonEmissionQueryRequest: CarbonEmissionQueryRequest,
    ): CancelablePromise<BaseResponse_Page_CarbonEmissionVO_ | any> {
        return __request(OpenAPI, {
            method: 'POST',
            url: '/carbonEmission/my/list/page/vo',
            body: carbonEmissionQueryRequest,
            errors: {
                401: `Unauthorized`,
                403: `Forbidden`,
                404: `Not Found`,
            },
        });
    }
    /**
     * update
     * @param carbonEmissionUpdateRequest carbonEmissionUpdateRequest
     * @returns BaseResponse OK
     * @returns any Created
     * @throws ApiError
     */
    public static updateUsingPost(
        carbonEmissionUpdateRequest: CarbonEmissionUpdateRequest,
    ): CancelablePromise<BaseResponse | any> {
        return __request(OpenAPI, {
            method: 'POST',
            url: '/carbonEmission/update',
            body: carbonEmissionUpdateRequest,
            errors: {
                401: `Unauthorized`,
                403: `Forbidden`,
                404: `Not Found`,
            },
        });
    }
}
